package com.ssy.lingxi.logistics.model.request;

import com.ssy.lingxi.logistics.api.enums.CooperateTypeEnum;
import com.ssy.lingxi.logistics.api.validate.InEnum;
import com.ssy.lingxi.logistics.model.enums.CommonStatusEnum;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 物流公司请求实体类
 *
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/10
 */
@Data
public class CompanyRequest implements Serializable {

    private static final long serialVersionUID = 2405606251096035801L;

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = {Update.class, UpdateStatus.class, Delete.class})
    private Long id;

    /**
     * 物流公司会员id
     */
    private Long companyMemberId;

    /**
     * 物流公司角色id
     */
    private Long companyRoleId;

    /**
     * 物流公司名称
     */
    @NotEmpty(message = "物流公司名称不能为空", groups = {Add.class, Update.class})
    private String name;

    /**
     * 物流公司编码
     */
    private String code;

    /**
     * 合作类型 1-平台物流服务商 2-商户合作物流公司
     */
    @NotNull(message = "合作类型不能为空", groups = {Add.class, Update.class})
    @InEnum(value = CooperateTypeEnum.class, groups = {Add.class, Update.class})
    private Integer cooperateType;

    /**
     * 状态 0-无效 1-有效
     */
    @NotNull(message = "状态不能为空", groups = {UpdateStatus.class})
    @InEnum(value = CommonStatusEnum.class, groups = {UpdateStatus.class})
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    public interface Add {
    }

    public interface Update {
    }

    public interface UpdateStatus {
    }

    public interface Delete {
    }
}
